package com.fz.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fz.entity.Orders;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;

/**
 * <p>
 * 存储订单信息 服务类
 * </p>
 *
 * @author hyr
 * @since 2025-06-18
 */
public interface OrdersService extends IService<Orders> {
    Page<Orders> getList(Long userId, Integer pageNo, Integer pageSize);

    Page<Orders> searchByOrderId(Long userId, Integer pageNo, Integer pageSize, String searchVal);

    Page<Orders> getByOrderStatus(Long userId, String status, Integer pageNo, Integer pageSize);

    Long createOrder(Long userId, BigDecimal totalAmount, Long[] goodsIds, Integer[] counts, Long storeId);

    Page<Orders> getByTimeRange(Long userId, String maxTime, String minTime, Integer pageNo, Integer pageSize);

    Orders getById(Long id);

    Boolean payTheOrder(String password, Long orderId, Long userId, Long couponId);
    Boolean batchShipOrder(Long[] ids,String orderStatus);

    Boolean deleteOrderByIdLogically(Long orderId);
}
